{template Public:Page:header}
<form id="Form">
<div class="container">
  <div class="row">
  
    {template Member:Index:sidebar}
    
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
           <div class="well">
           <h3>帐号安全保护</h3>
           <div class="alert alert-info fade in">
                <button data-dismiss="alert" class="close">
                    ×
                </button>
                <i class="fa-fw fa fa-info"></i>
                <strong>提示</strong> 开启帐号安全保护后,操作需要输入手机验证码。
            </div>
                     <table class="table table-hover">
                    <tbody>
                     <tr>
                        <td style="width:70%">
                         帐号登录保护
                        </td>
                        <td>
                        <label>
                            <input type="checkbox" name="loginsecurity" class="checkbox-slider slider-icon">
                            <span class="text"></span>
                        </label>
                        </td>
                     </tr>
                     
                      <tr>
                        <td>
                         帐号提现保护
                        </td>
                        <td>
                        <label>
                            <input type="checkbox" name="paysecurity" class="checkbox-slider slider-icon">
                            <span class="text"></span>
                        </label>
                        </td>
                     </tr>
                   </tbody>
                </table>
 
           </div>
    </div>
  </div>
</div>
</div>
</form>
{if $member['loginsecurity']==1}<script> var loginsecurity=1;</script>{else}<script> var loginsecurity=0;</script>{/if}
{if $member['paysecurity']==1}<script> var paysecurity=1;</script>{else}<script> var paysecurity=0;</script>{/if}
<script>
$(function(){
	
	if(loginsecurity){
		$('input[name="loginsecurity"]').click();
	}
	
	if(paysecurity){
		$('input[name="paysecurity"]').click();
	}

	$('input[name="loginsecurity"],input[name="paysecurity"]').click( function () {
		$.post('/post/member/idsecurity',$("#Form").serialize(), function(json) {
						
				if(json.status=='error'){
					bootbox.alert({
						 message: json.message
					 });
				}
	
				return true;
			
		  }, 'json');
	
	 });
});			 
</script>		 
                 
{template Public:Page:footer}